package nowCoder;

import java.util.Scanner;

public class HJ53 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int h = 1;
        for (int i = 0; i < n; i++) {
            h+=2;
        }
        int[][] yh = new int[h][h];
        yh[0][h/2] = 1;
        for (int i = 1; i < h; i++) {
            int[] y = yh[i];
            for (int j = 0; j < h; j++) {
                int a = j-1;
                int c = j+1;
                if (a < 0){
                    y[j] = yh[i-1][j] + yh[i-1][c];
                }else if (c == h){
                    y[j] = yh[i-1][j] + yh[i-1][a];
                }else {
                    y[j] = yh[i-1][a] + yh[i-1][j] + yh[i-1][c];
                }
            }
        }
        boolean f = false;
        for (int i = 0; i < n; i++) {
            if (yh[n-1][i] != 0 && yh[n-1][i] % 2 == 0){
                System.out.println(i);
                f = true;
                break;
            }
        }
        if (!f){
            System.out.println(-1);
        }
    }
}
